<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

   <ui:composition template="/template/template1.xhtml">     
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateAccountTitle}"></h:outputText>
        </ui:define>
        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
         
      
            <h:form>
                   <p:panel id="panel1" header="Change Password" style="margin-bottom:10px;">  
                <h:panelGrid columns="2">
                 
                    <h:outputLabel value="Old Password: *"  />
                    <p:password id="password" value="#{accountController.selected.password}" required="true" requiredMessage="No Username"/>
             
                          <h:outputLabel for="pwd1" value="New Password: *" />  
            <p:password id="pwd1" value="#{accountController.temp}" match="pwd2" label="Password 1" required="true"/>  
  
            <h:outputLabel for="pwd2" value="Retype Password: *" />  
            <p:password id="pwd2" value="#{accountController.temp}" label="Password 2" required="true"/>  
                   
                </h:panelGrid>
                
                <br />
                <p:commandButton ajax="false" action="#{accountController.changePass()}" value="Save" />
               <p:commandButton value="Reset" update="panel1" process="@this"  >  
        <p:resetInput target="panel1" />  
    </p:commandButton> 
                     </p:panel>  
            </h:form>
            
        </ui:define>
    </ui:composition>
    
    
</html>


